package com.sponsorpay.sdk.android.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class SPIdValidator
{
  private static Pattern PATTERN = Pattern.compile("^[A-Z0-9_]+$");

  public static void validate(String paramString)
    throws SPIdException
  {
    if (StringUtils.nullOrEmpty(paramString))
      throw new SPIdException("An ID cannot be null or empty.");
    if (!PATTERN.matcher(paramString).find())
      throw new SPIdException("An ID can only contain uppercase letters, numbers and the _ underscore symbol.");
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.sponsorpay.sdk.android.utils.SPIdValidator
 * JD-Core Version:    0.6.2
 */